package com.longe.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
public class ExportUser implements Serializable {

    private static final long serialVersionUID = -4761020662611250782L;

    @Excel(name="name")
    private String name;

    @Excel(name="age")
    private Integer age;

    @Excel(name="addr")
    private String addr;

    @Excel(name="time", format = "yyyy-MM-dd")
    private Date time;

    @Excel(name="sex", replace = { "男_1", "女_2" }, suffix = "生")
    private Integer sex;

    public ExportUser(String name, Integer age, String addr, Date time, Integer sex) {
        this.name = name;
        this.age = age;
        this.addr = addr;
        this.time = time;
        this.sex = sex;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", addr='" + addr + '\'' +
                ", time=" + time +
                ", sex=" + sex +
                '}';
    }
}
